﻿Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Web.Script.Services
Imports CrystalDecisions.CrystalReports.Engine

' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
' <System.Web.Script.Services.ScriptService()> _
<WebService(Namespace:="http://hivi.vn/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class Service
	Inherits System.Web.Services.WebService

	<WebMethod()> _
	  <ScriptMethod(ResponseFormat:=ResponseFormat.Json)> _
	  Public Function Login(ByVal username As String, ByVal password As String) As String
		Return DbHelper.checkLogin(username, password)
	End Function

	<WebMethod()> _
	<ScriptMethod(ResponseFormat:=ResponseFormat.Json)> _
	Public Function getData(ByVal columnlist As String, ByVal tablename As String, ByVal condition As String) As String
		Return DbHelper.getData(columnlist, tablename, condition)
	End Function

	<WebMethod()> _
	  <ScriptMethod(ResponseFormat:=ResponseFormat.Json)> _
	  Public Function getData2(ByVal sqlcom As String) As String
		Return DbHelper.getData2(sqlcom)
	End Function


	<WebMethod()> _
	 <ScriptMethod(ResponseFormat:=ResponseFormat.Json)> _
	 Public Function getStock() As String
		Return DbHelper.getStock()
	End Function

	<WebMethod()> _
	<ScriptMethod(ResponseFormat:=ResponseFormat.Json)> _
	Public Function executeCommand(ByVal sqlcomm As String) As String
		Return DbHelper.executeCommand(sqlcomm)
	End Function

	<WebMethod()> _
	  <ScriptMethod(ResponseFormat:=ResponseFormat.Json)> _
	  Public Function Test() As String
		Return DbHelper.Test()
	End Function


End Class
